<template>
  <view v-if="showNoDataFlag" class="no-wrap">
    <image mode="widthFix" src="/static/images/icon/no-data.png" class="no-img" />
    <view :class="['no-text', {'el-big-font': isElderMode}]">{{ showNoStr }}</view>
  </view>
</template>

<script>
export default {
  name: 'NoData',
  props: {
    showNoData: {
      type: Boolean,
      default: true
    },
    showNoStr: {
      type: String,
      default: '未查询到相关数据'
    },
    isElderMode: { // 老年版判断
      type: Boolean,
      default: false
    }
  },
  data() {
    return {}
  },
  computed: {
    showNoDataFlag() {
      return this.showNoData
    }
  },
  methods: {}
}
</script>

<style>
.no-wrap {
  text-align: center;
  padding-top: 20%;
  font-size: 32rpx;
}

.no-img {
  width: 300rpx;
}

.no-text {
  color: #c1c1c1;
  font-weight: 300;
}
</style>
